{#{% extends "base.html" %}#}
{#{% load static %}#}
{#{% block main %}#}
    <head>
{#        <meta charset="utf-8">#}
{#        <meta http-equiv="refresh" content="60">#}
{#        <meta name="robots" content="index, follows">#}
{#        <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">#}
{#        <meta http-equiv="x-ua-compatible" content="ie=edge">#}
        <link href="../static/css/bk.css" rel="stylesheet">
        <script type="text/javascript">

            $(document).ready(function () {
                $(".table tbody td:nth-child(1):lt({{ finished_num }})").css('color', 'red');
                {% if province_flag %}
                    $('.table tbody tr:nth-child(14)  td:nth-child(1)').css('color', 'red');
                {% endif %}
                tb = document.getElementById('compete_table')
                autoRowSpan(tb, 0, 0)
                {#合并全省数据#}
                customColSpan(tb, 1, 14)
                {#添加属性#}
                $('#compete_table > tbody > tr:nth-child(14) > td:nth-child(1)').attr('colSpan', 2)
                {#$('#compete_table > tbody > tr:nth-child(14) > td:nth-child(1)').css('width', "200%")#}
                $('#compete_table > tbody > tr:nth-child(14) > td:nth-child(1)').css('table-layout', "fixed")

            })
            {#自动合并相同行#}

            function autoRowSpan(tb, row, col) {

                var lastValue = "";
                var value = "";
                var pos = 1;
                for (var i = row; i < tb.rows.length; i++) {
                    value = tb.rows[i].cells[col].innerText;
                    if (lastValue == value) {
                        tb.rows[i].deleteCell(col);
                        tb.rows[i - pos].cells[col].rowSpan = tb.rows[i - pos].cells[col].rowSpan + 1;
                        pos++;
                    } else {
                        lastValue = value;
                        pos = 1;
                    }
                }
            }

            function customColSpan(tb, col, row) {
                {#alert(tb.rows[row].cells[col-1].innerHTML)#}
                {#删掉指定                #}
                tb.rows[row].deleteCell(0);
                {#合并单元格#}
                {#tb.rows[row].cells[col - 1].style.colSpan = "2";#}
                {#alert(tb.rows[row].cells[col - 1].colSpan)#}

            }


            ;
        </script>
        <title>日平台追踪</title>
    </head>
    <div class='yb-main'>
        {#        <h3 style="margin-bottom: 2px; color:yellow">{{ show_time.month }}月份每日平台达成追踪({{ show_time.month }}月{{ show_time.day }}日)</h3>#}
        {#        <h3 style="margin-bottom: 2px; color:yellow">&nbsp;四月份三年期业务日平台({{ show_time.month }}月{{ show_time.day }}日)</h3>#}
        <h3 style="margin-bottom: 2px; color:yellow">&nbsp;5月业务每日追踪<font size="2">&nbsp;&nbsp;(单位：万元)</font></h3>
        {#        <p style="margin-bottom: 2px;color: yellow">{{ show_time.time }}&nbsp;&nbsp;单位：万元</p>#}
        <p style="margin-bottom: 2px;color: yellow;text-align: right">{{ show_time.time }}本战报仅供业务追踪参考&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
        {% autoescape off %}
            {{ html }}
        {% endautoescape %}
        <p id="day-comment">
            {% autoescape off %}
                {{ comment }}
            {% endautoescape %}
        </p>
    </div>

{#{% endblock %}#}
